package com.yuan.dingtalk;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "dingtalk")
public class DingTalkProperties {

    /**
     * 钉钉apiUrl
     */
    private String apiUrl;
    /***
     * 钉钉corpId
     */
    private String corpId;

    /**
     * 钉钉开放平台应用agentId
     */
    private Long agentId;

    /**
     * 钉钉开放平台应用appKey
     */
    private String appKey;

    /**
     * 钉钉开放平台appSecret
     */
    private String appSecret;

    /**
     * 缓存方式
     */
    private String cacheType;

    public String getApiUrl() {
        return apiUrl;
    }

    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }

    public String getCorpId() {
        return corpId;
    }

    public void setCorpId(String corpId) {
        this.corpId = corpId;
    }

    public Long getAgentId() {
        return agentId;
    }

    public void setAgentId(Long agentId) {
        this.agentId = agentId;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getCacheType() {
        return cacheType;
    }

    public void setCacheType(String cacheType) {
        this.cacheType = cacheType;
    }

    @Override
    public String toString() {
        return "DingTalkProperties{" +
                "apiUrl='" + apiUrl + '\'' +
                ", corpId='" + corpId + '\'' +
                ", agentId=" + agentId +
                ", appKey='" + appKey + '\'' +
                ", appSecret='" + appSecret + '\'' +
                ", cacheType='" + cacheType + '\'' +
                '}';
    }
}
